<?php

namespace App\Enums\OpenShop\InvestmentPromotion;

class UserOrderEnum
{

    const STEP_GENERATE_USER_INFO = 1;
    const STEP_GENERATE_CONTRACT  = 2;
    const STEP_PART_PAID          = 3;
    const STEP_FINISH_PAID        = 4;
    const STEP_FINISH_CONTRACT    = 5;

    const STEP_MAP = [
        self::STEP_GENERATE_USER_INFO => "提交个人基础信息",
        self::STEP_GENERATE_CONTRACT  => "提交合同信息",
        self::STEP_PART_PAID          => "部分支付",
        self::STEP_FINISH_PAID        => "支付完成",
        self::STEP_FINISH_CONTRACT    => "完成签署",
    ];

    //step的映射  用于列表筛选与判断 [文案不同]
    const STEP_FORMAT_0  = 0;
    const STEP_FORMAT_1  = 1;
    const STEP_FORMAT_2  = 2;
    const STEP_FORMAT_3  = 3;
    const STEP_FORMAT_4  = 4;
    const STEP_FORMAT_5  = 5;
    const STEP_FORMAT_6  = 6; // 建店信息待确认
    const STEP_FORMAT_7  = 7; // 设计师待指派
    const STEP_FORMAT_8  = 8; // 设计图待提交
    const STEP_FORMAT_9  = 9; // 进场待确认
    const STEP_FORMAT_10 = 10; // 施工待完成
    const STEP_FORMAT_11 = 11;
    const STEP_FORMAT_12 = 12;
    const STEP_FORMAT_13 = 13;
    const STEP_FORMAT_14 = 14;
    const STEP_FORMAT_15 = 15;
    const STEP_FORMAT_16 = 16;
    const STEP_FORMAT_17 = 17;
    const STEP_FORMAT_18 = 18;

    const STEP_FORMAT = [
        self::STEP_FORMAT_0 => '商家签约(待支付)',
        self::STEP_FORMAT_1 => '商家签约(待签署)',
        self::STEP_FORMAT_2 => '已完成',
    ];

    const STEP_FORMAT_FOREFRONT = [
        self::STEP_FORMAT_0  => '商家待支付',
        self::STEP_FORMAT_1  => '商家待签约',
        self::STEP_FORMAT_2  => '披露单待上传',
        self::STEP_FORMAT_3  => '开发待指派',
        self::STEP_FORMAT_4  => '选址待提交',
        self::STEP_FORMAT_5  => '商家待确认',
        self::STEP_FORMAT_6  => '建店信息待确认',
        self::STEP_FORMAT_7  => '设计师待指派',
        self::STEP_FORMAT_8  => '设计图待提交',
        self::STEP_FORMAT_9  => '进场待确认',
        self::STEP_FORMAT_10 => '施工待完成',
        self::STEP_FORMAT_11 => '督导待指派',
        self::STEP_FORMAT_12 => '督导待验收',
        self::STEP_FORMAT_13 => '设计模块待确认',
        self::STEP_FORMAT_14 => '设计模块待支付',
        self::STEP_FORMAT_15 => '设备模块待确认',
        self::STEP_FORMAT_16 => '设备模块待支付',
        self::STEP_FORMAT_17 => '软装模块待支付',
        self::STEP_FORMAT_18 => '开业报告待提交',
    ];
    //后三个与MainProcessEnum中相对应  这里只是统计头的映射

    //商家APP角标使用
    const APP_CORNER_MARK_0 = 0;
    const APP_CORNER_MARK_1 = 1;
    const APP_CORNER_MARK_2 = 2;

    const APP_CORNER_MARK = [
        self::APP_CORNER_MARK_0 => '未开始',
        self::APP_CORNER_MARK_1 => '待完成',
        self::APP_CORNER_MARK_2 => '已完成',
    ];


    const APP_CORNER_MARK_TEMP_0 = 0;
    const APP_CORNER_MARK_TEMP_1 = 1;
    const APP_CORNER_MARK_TEMP_2 = 2;
    const APP_CORNER_MARK_TEMP_3 = 3;


    const APP_CORNER_MARK_TEMP = [
        self::APP_CORNER_MARK_TEMP_0 => '未开始',
        self::APP_CORNER_MARK_TEMP_1 => '待完成',
        self::APP_CORNER_MARK_TEMP_2 => '待完成',
        self::APP_CORNER_MARK_TEMP_3 => '已完成',
    ];

    const STEP_FORMAT_MAPPING = [
        self::STEP_FORMAT_0 => [
            self::STEP_GENERATE_USER_INFO,
            self::STEP_GENERATE_CONTRACT,
            self::STEP_PART_PAID,
        ],
        self::STEP_FORMAT_1 => [
            self::STEP_FINISH_PAID,
        ],
        self::STEP_FORMAT_2 => [
            self::STEP_FINISH_CONTRACT,
        ],
    ];

    const OPEN_SHOP_STATUS_OK = 1;

    const OPEN_SHOP_STATUS_MAPPING = [
        self::OPEN_SHOP_STATUS_OK => '商家开发选址确认',
    ];

    //开店枚举
    const STEP_LOCATION_MAPPING_2 = [
        self::STEP_FORMAT_0 => [
            self::STEP_GENERATE_USER_INFO,
            self::STEP_GENERATE_CONTRACT,
            self::STEP_PART_PAID,
        ],
        self::STEP_FORMAT_1 => [
            self::STEP_FINISH_PAID,
        ],
        self::STEP_FORMAT_3 => [
            self::STEP_FINISH_CONTRACT,
        ],
    ];

    const STEP_LOCATION_MAPPING_1 = [
        self::STEP_FORMAT_3       => [
            MainProcessEnum::SHOP_LOCATION_CHOOSE_MANAGER,
        ],
        self::STEP_FORMAT_4       => [
            MainProcessEnum::SHOP_LOCATION_ASSIGN_MANAGER,
        ],
        self::STEP_FORMAT_5       => [
            MainProcessEnum::SHOP_LOCATION_FORM_SUBMIT,
        ],
        self::OPEN_SHOP_STATUS_OK => [
            MainProcessEnum::SHOP_LOCATION_CONFIRM,
        ],
    ];


    const STATUS_NORMAL    = 1;
    const STATUS_FORBIDDEN = 0;
    const STATUS_OK        = 2;
    const STATUS_MAP       = [
        self::STATUS_NORMAL    => '正常',
        self::STATUS_OK        => '完成',
        self::STATUS_FORBIDDEN => '作废',
    ];
}
